#include <thread>
#include "../../include/pool/thread.h"
int Thread::generateId_ = 0;
// 启动线程
void Thread::start()
{ 
    std::thread t(threadFunc_, threadId_);
    t.detach(); // 设置分离线程   linux pthread库的分离线程
}

Thread::Thread(ThreadFunc threadFunc) : threadFunc_(threadFunc), threadId_(generateId_++)
{
}
int Thread::getThreadId()
{
    return threadId_;
}
Thread::~Thread()
{
}